#!/usr/bin/env python

from renyare.wsgi.log import logger
from renyare.xml.database import DbXml

class Database:
	"""
	Empty middleware - analog of site virtual directory
	"""
	log = logger()
	def __init__(self, app, **kw):
		self.orig_app = app
		self.config = kw.get('config') or []

	def __call__(self, environ, start_response):
		environ['renyare.dbxml'] = DbXml()
		return self.orig_app(environ, start_response)
